﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsGame4
{
    class Bomb_InitialState : State
    {
        private static Bomb_InitialState instance;

        private Bomb_InitialState()
        {
            base.Name = "InitialState";
        }

        public override void enter(AIObject aiObject)
        {
        }

        public static Bomb_InitialState getInstance()
        {
            if (instance == null)
                instance = new Bomb_InitialState();
            return instance;
        }

        public override void execute(AIObject aiObject)
        {
             // Check if is in the destine
            AIBomb aiBomb = (AIBomb)aiObject;
            aiObject.StateMachine.changeState(Bomb_ActivateState.getInstance());
        }

        public override void exit(AIObject aiObject)
        {
        }

        public override Boolean onMessage(AIObject aiObject, Message message)
        {
            Boolean correct = false;
            switch (message.Type)
            {
                case Message.MessageType.msg_destroy:
                    {
                        //aiObject.StateMachine.changeState(Projectile_DestroyState.getInstance());
                        correct = true;
                        break;
                    }
            }
            return correct;
        }
    }
}
